package com.shensi.appCollect.service.impl;


import com.shensi.appCollect.dao.SuperPayOrderMapper;
import com.shensi.appCollect.pojo.SuperPayOrder;
import com.shensi.appCollect.service.SuperPayOrderService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;


/**
 * 超级会员开通支付订单Service业务层处理
 * 
 * @author qujia
 * @date 2021-12-20
 */
@Service("superPayOrderService")
public class SuperPayOrderServiceImpl implements SuperPayOrderService
{
    @Resource
    private SuperPayOrderMapper superPayOrderMapper;

    /**
     * 查询超级会员开通支付订单
     *
     * @param superPayId 超级会员开通支付订单ID
     * @return 超级会员开通支付订单
     */
    @Override
    public SuperPayOrder selectSuperPayOrderById(Long superPayId)
    {
        return superPayOrderMapper.selectSuperPayOrderById(superPayId);
    }

    /**
     * 查询超级会员开通支付订单列表
     *
     * @param superPayOrder 超级会员开通支付订单
     * @return 超级会员开通支付订单
     */
    @Override
    public List<SuperPayOrder> selectSuperPayOrderList(SuperPayOrder superPayOrder)
    {
        return superPayOrderMapper.selectSuperPayOrderList(superPayOrder);
    }

    /**
     * 新增超级会员开通支付订单
     *
     * @param superPayOrder 超级会员开通支付订单
     * @return 结果
     */
    @Override
    public int insertSuperPayOrder(SuperPayOrder superPayOrder)
    {
        superPayOrder.setCreateTime(new Date());
        return superPayOrderMapper.insertSuperPayOrder(superPayOrder);
    }

    /**
     * 修改超级会员开通支付订单
     *
     * @param superPayOrder 超级会员开通支付订单
     * @return 结果
     */
    @Override
    public int updateSuperPayOrder(SuperPayOrder superPayOrder)
    {
        return superPayOrderMapper.updateSuperPayOrder(superPayOrder);
    }

    /**
     * 批量删除超级会员开通支付订单
     *
     * @param superPayIds 需要删除的超级会员开通支付订单ID
     * @return 结果
     */
    @Override
    public int deleteSuperPayOrderByIds(Long[] superPayIds)
    {
        return superPayOrderMapper.deleteSuperPayOrderByIds(superPayIds);
    }

    /**
     * 删除超级会员开通支付订单信息
     *
     * @param superPayId 超级会员开通支付订单ID
     * @return 结果
     */
    @Override
    public int deleteSuperPayOrderById(Long superPayId)
    {
        return superPayOrderMapper.deleteSuperPayOrderById(superPayId);
    }

}
